<?php
/**
 * SemesterSection Model
 *
 * Utilizes the Data Mapper pattern to persist data. Represents a single
 * semester_section entry
 *
 * @version $Id: SemesterSection.php 73 2010-04-25 00:30:44Z yingkuang.chen@gmail.com $
 * @license New BSD License
 * @uses Semester_Model_SemesterSectionMapper
 * @package semester
 * @subpackage Model
 */
class Semester_Model_SemesterSection extends Semester_Model_Doctrine_BaseSemesterSection
{

    /**
     *  get section semester data
     * @param $year
     * @param $semester
     * @param $grade
     * @return unknown_type
     */
    public function fetchYearSeme($year,$semester,$grade)
    {

        $q =  $this->getTable()->createQuery('a')
        ->where('year=?',$year)
        ->andwhere('semester=?',$semester)
        ->andwhere('grade=?',$grade)
        ->orderby('sort');
        return $q ->fetchArray();
    }

}
